<%= form_for(@group) do |f| %>
  <% if @group.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@group.errors.count, "error") %> prohibited this group from being saved:</h2>

      <ul>
      <% @group.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name, 'Ime' %><br />
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :name, 'Sekcija' %><br />
    <%= collection_select(:group, :groups_section_id, @sections, :id, :name) %>
  </div>
  <div class="field">
  	<%= f.label :name, 'Minimalne potrebne dozvole' %><br />
  	<%= collection_select(:group, :permission_id, @permissions, :id, :name) %>
  </div>
  <div class="field">
    <%= f.label :description, 'Opis' %><br />
    <%= f.text_area :description %>
  </div>
  <div class="actions">
    <%= f.submit 'Spremi' %>
  </div>
<% end %>
